import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [{
        path: "/login",
        name: "login",
        meta: {
            title: "用户登录"
        },
        component: () => import("@/pages/login")
    },
    {
        path: "/",
        name: 'Home',
        component: () => import("@/layouts/BasicLayout"),
        redirect: '/goods',
        children: [{
            path: '/goods',
            name: 'GoodsList',
            component: () => import("@/pages/goods/list")
        }]
    }
];

const router = new VueRouter({
    mode: "history",
    routes
});

export default router;
